package com.aspose.cells;

import java.util.Iterator;

public class OleObjectCollection extends CollectionBase {
   private ShapeCollection b;

   OleObjectCollection(ShapeCollection shapes) {
      this.b = shapes;
   }

   boolean a() {
      Iterator var1 = this.iterator();

      OleObject var2;
      do {
         if (!var1.hasNext()) {
            return true;
         }

         var2 = (OleObject)var1.next();
      } while(var2.a());

      return false;
   }

   public int add(int upperLeftRow, int upperLeftColumn, int height, int width, byte[] imageData) {
      this.b.addOleObject(upperLeftRow, 0, upperLeftColumn, 0, height, width, imageData);
      return this.getCount() - 1;
   }

   public int add(int upperLeftRow, int upperLeftColumn, int height, int width, byte[] imageData, String linkedFile) throws Exception {
      OleObject var7 = this.b.addOleObject(upperLeftRow, 0, upperLeftColumn, 0, height, width, imageData);
      var7.setLink(true);
      var7.setObjectSourceFullName(linkedFile);
      var7.c(true);
      return this.getCount() - 1;
   }

   public OleObject get(int index) {
      return (OleObject)this.a.get(index);
   }

   public void clear() {
      for(int var1 = 0; var1 < this.getCount(); ++var1) {
         this.b.a((Shape)this.get(var1));
      }

      this.a.clear();
   }

   public void removeAt(int index) {
      this.b.a((Shape)this.get(index));
      this.a.remove(index);
   }

   void a(OleObject var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   void b(OleObject var1) {
      this.a.remove(var1);
   }
}
